/*
 * @Description:
 * @FilePath: \rs_wms_pc\src\api\storehouse\checkPlan\index.js
 */
import request from '@/utils/request'

// 查询库存盘点计划列表
export function listCheckPlan(query) {
  return request({
    url: '/storehouse/checkPlan/list',
    method: 'get',
    params: query
  })
}

// 查询库存盘点计划详细
export function getCheckPlan(id) {
  return request({
    url: '/storehouse/checkPlan/' + id,
    method: 'get'
  })
}

// 新增库存盘点计划
export function addCheckPlan(data) {
  return request({
    url: '/storehouse/checkPlan',
    method: 'post',
    data: data
  })
}

// 修改库存盘点计划
export function updateCheckPlan(data) {
  return request({
    url: '/storehouse/checkPlan',
    method: 'put',
    data: data
  })
}

// 删除库存盘点计划
export function delCheckPlan(id) {
  return request({
    url: '/storehouse/checkPlan/' + id,
    method: 'delete'
  })
}

// 手动生成盘点任务
export function generator(ids) {
  return request({
    url: '/storehouse/checkPlan/generator/'+ids,
    method: 'post'
  })
}

// 新增、编辑库存盘点计划及计划明细
export function addWithDetailCheckPlan(data) {
  return request({
    url: '/storehouse/checkPlan/addWithDetail',
    method: 'post',
    data: data
  })
}


// 查询库存盘点计划明细
export function getCheckPlanDetail(params) {
  return request({
    url: '/storehouse/stockCheckPlanDetail/list',
    method: 'get',
    params
  });
}

// 查询库存盘点计划 可选物料
export function getProductByStorehouseNo(params) {
  return request({
    url: '/basic/erpProduct/listByStorehouseNo',
    method: 'get',
    params
  });
}

